from django.db import models
from django.utils.translation import ugettext as _


# Create your models here.
class ElasticSearchImportRecord(models.Model):
    meta = models.OneToOneField('storage.DataMeta', on_delete=models.CASCADE, related_name='es_record')
    status = models.CharField(max_length=10,
                              choices=(("SUCCESS", _("SUCCESS")), ("FAILED", _("FAILED")), ("IMPORTING", _("IMPORTING"))))
    last_import_time = models.DateField(auto_now=True)
